<ui:decorate xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	template="template/kmsTemplate.xhtml">

	<ui:define name="kmsTitle">
		<ui:include src="template/kmsTop.xhtml" />
	</ui:define>

	<ui:define name="kmsMenu">
		<ui:include src="template/kmsLeftMenu.xhtml" />
	</ui:define>
	
	<ui:define name="kmsBody">
		<h:form id="bform">
		<rich:panel>
			<rich:dataTable id="bTable" border="1"
				value="#{kmsBookBean.kmsBookItems}" var="b" style=" width : 100%;" rows="10">
				<f:facet name="header">
					<rich:columnGroup>
						<rich:column style="width:50px;"/>
						<rich:column style="width:120px;">
							<h:outputText value="#{kmsMsg.bookName}" />
						</rich:column>
						<rich:column style="width:120px;">
							<h:outputText value="#{kmsMsg.knowledgeTag}" />
						</rich:column>
						<rich:column style="width:80px;">
							<h:outputText value="#{kmsMsg.author}" />
						</rich:column>
						<rich:column style="width:120px;">
							<h:outputText value="#{kmsMsg.press}" />
						</rich:column>
						<rich:column style="width:120px;">
							<h:outputText value="#{kmsMsg.publishTime}" />
						</rich:column>
						<rich:column>
							<h:outputText value="#{kmsMsg.location}" />
						</rich:column>
						<rich:column>
							<h:outputText value="#{kmsMsg.buyTime}" />
						</rich:column>
						<rich:column>
							<h:outputText value="#{kmsMsg.user}" />
						</rich:column>
					</rich:columnGroup>
				</f:facet>

				<rich:column>
					<h:commandLink action="kmsBook_edit" value="edit">
						<f:param name="bId" value="#{b.bookId}" />
					</h:commandLink>
				</rich:column>
				
				<rich:column>
					<h:commandLink action="kmsBook" value="#{b.bookname}">
						<f:param name="bId" value="#{b.bookId}" />
					</h:commandLink>
				</rich:column>

				<rich:column>
					<h:outputText value="#{b.kmsKnowledge.name}" />
				</rich:column>

				<rich:column>
					<h:outputText value="#{b.author}" />
				</rich:column>
				
				<rich:column>
					<h:outputText value="#{b.press}" />
				</rich:column>
				
				<rich:column>
					<h:outputText value="#{b.publishTime}">
						<f:convertDateTime pattern="yyyy-MM-dd" />
					</h:outputText>
				</rich:column>
				
				<rich:column>
					<h:outputText value="#{b.location}" />
				</rich:column>
				
				<rich:column>
					<h:outputText value="#{b.buyTime}">
						<f:convertDateTime pattern="yyyy-MM-dd" />
					</h:outputText>
				</rich:column>
				
				<rich:column>
					<h:outputText value="#{b.kmsUser.username}" />
				</rich:column>
			</rich:dataTable>
			<rich:datascroller for="bform:bTable" style=" width : 100%;"/>
			</rich:panel>
		</h:form>
	</ui:define>
	
	<ui:define name="kmsBottom">
		<ui:include src="template/kmsBottom.xhtml" />
	</ui:define>
</ui:decorate>